package service

import (
	"context"
	"github.com/zeromicro/go-zero/core/logx"
	"gozero-demo/internal/repo/mysql"
	"gozero-demo/internal/svc"
)

type GoodsService struct {
	logx.Logger
	ctx         context.Context
	svcCtx      *svc.ServiceContext
	goodsRepo   *mysql.GoodsRepo
	setMealRepo *mysql.SetMealRepo
}

func NewGoodsService(ctx context.Context, svcCtx *svc.ServiceContext) *GoodsService {
	return &GoodsService{
		Logger:      logx.WithContext(ctx),
		ctx:         ctx,
		svcCtx:      svcCtx,
		goodsRepo:   mysql.NewGoodsRepo(ctx, svcCtx),
		setMealRepo: mysql.NewSetMealRepo(ctx, svcCtx),
	}
}
